home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / todir1.arc / TODIR.DOC < prev    next >
Text File  |  1990-08-14  |  4KB  |  98 lines

  1.  
  2. =============================================================================
  3.    TODIR  v1.00  July 1990 : Donated to the Public Domain by Aaron Brenner
  4. =============================================================================
  5.  
  6. Purpose:
  7.  
  8.         TODIR provides a simple path aliasing facility to make it easier to
  9.         navigate complex directory trees.  In plain english, it allows you
  10.         to assign a name to any directory on any drive and to go to that
  11.         directory immediately without needing to describe a complete path
  12.         on the command line or to use multiple commands.  A single command
  13.         with one parameter will get you from here to there at once.
  14.  
  15.  
  16. Command syntax:
  17.  
  18.         TODIR <alias>
  19.                 CHDIR to the path associated with <path alias>
  20.  
  21.         TODIR <alias> ?
  22.                 Display the path associated with <path alias>
  23.  
  24.         TODIR ?
  25.                 Display all aliases known to TODIR and their associated paths.
  26.  
  27.  
  28. Implementation:
  29.  
  30.         TODIR requires an ASCII text file for the alias-to-path associations.
  31.         By default, the name of the file is TODIR.PTH (but that can be changed
  32.         by the TODIRPTH environment variable). Each line of this file defines
  33.         one alias, with the alias name followed by the path to associate with
  34.         it. Blank lines are ignored.
  35.  
  36.  
  37. Sample TODIR.PTH:
  38.  
  39.         bin     c:\bin
  40.         c       e:\msc\bin
  41.         todir   d:\asm\src\todir
  42.         util    c:\bin\util
  43.  
  44.         TODIR will attempt to find this file as follows:
  45.  
  46.         1) In the directory or file name indicated by the TODIRPTH environment
  47.            variable. If the variable ends with "\" or "/", the file name is
  48.            expected to be TODIR.PTH in that directory; if the attributes of
  49.            the path specified in TODIRPTH indicate that it is a subdirectory,
  50.            the file name is assumed to be TODIR.PTH in that directory;
  51.            otherwise, TODIRPTH is assumed to be the full file specification.
  52.  
  53.         2) In a directory specified by the PATH environment variable. In this
  54.            case, the file name must be TODIR.PTH.
  55.  
  56.         3) In the current directory as TODIR.PTH.
  57.  
  58.         If TODIR is unable to locate the file, an error is reported.
  59.  
  60.  
  61. Example:
  62.  
  63.         Assuming that your .PTH file was identical to the sample listed
  64.         above, the command
  65.  
  66.                 TODIR UTIL<enter>
  67.  
  68.         typed at the DOS command line or invoked within a batch file would
  69.         reset the current DOS directory to C:\BIN\UTIL.
  70.  
  71.  
  72.         Assuming that TODIRPTH=d:\asm\src\todir.pth, the command
  73.  
  74.                 TODIR ?
  75.  
  76.         will display
  77.  
  78.                 All aliases in D:\ASM\SRC\TODIR.PTH:
  79.                 BIN             C:\BIN
  80.                 C               E:\MSC\BIN
  81.                 TODIR           D:\ASM\SRC\TODIR
  82.                 UTIL            C:\BIN\UTIL
  83.  
  84.  
  85. ERRORLEVEL set:
  86.  
  87.         0 ............. Successful completion of command.
  88.         1 ............. TODIR was unable to locate the alias file.
  89.         2 ............. The alias specified on the command line was not found
  90.                         in the alias file.
  91.         3 ............. There was no path associated with the specified alias.
  92.         4 ............. DOS returned an error when TODIR attempted to change
  93.                         the current directory.
  94.         5 ............. There were no parameters on the command line.
  95.         6 ............. Insufficient free memory.
  96.  
  97. (EOF)
  98.